<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改车辆-信息')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${carInfo}">
            <input name="carInfoId" th:field="*{carInfoId}" type="hidden">
            <input name="carId" th:field="*{carId}" type="hidden">
            <input name="menuId" th:field="*{menuId}" type="hidden">
            <input name="configType" th:field="*{configType}" type="hidden">
            <input id="car_info" name="info" th:field="*{info}" type="hidden">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">前部座椅空间测量</h3>
                </div>
                <div class="panel-body">
                    <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                        <label class="col-sm-2 control-label">照片</label>
                        <div class="col-sm-10" th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile_qbzy',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType,'qbzy')})"/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">座垫前沿--刹车踏板距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.brakePedalDistance" th:field="*{infoMap.brakePedalDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫前沿--油门踏板距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.acceleratorPedalDistance" th:field="*{infoMap.acceleratorPedalDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫前沿--离合器踏板距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.clutchPedalDistance" th:field="*{infoMap.clutchPedalDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫前沿-方向盘距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.frontSeatCushionSteeringWheelDistance" th:field="*{infoMap.frontSeatCushionSteeringWheelDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">靠背--方向盘距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.backrestSteeringWheelDistance" th:field="*{infoMap.backrestSteeringWheelDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.seatCushionCeilingDistance" th:field="*{infoMap.seatCushionCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">头枕最高档--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.topHeadrestCeilingDistance" th:field="*{infoMap.topHeadrestCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">头枕--方向盘距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.headrestSteeringWheelDistance" th:field="*{infoMap.headrestSteeringWheelDistance}" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">驾驶舱空间测量（座椅最后最低状态）</h3>
                </div>
                <div class="panel-body">
                    <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                        <label class="col-sm-2 control-label">照片</label>
                        <div class="col-sm-10" th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile_jskj',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType,'jskj')})"/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">地毯--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.carpetCeilingDistance" th:field="*{infoMap.carpetCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫前沿--前舱距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.frontSeatCushionFrontCabinDistance" th:field="*{infoMap.frontSeatCushionFrontCabinDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中控台--门槛距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.centerConsoleThresholdDistance" th:field="*{infoMap.centerConsoleThresholdDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">地毯--档杆距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.carpetLeverDistance" th:field="*{infoMap.carpetLeverDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">仪表板最高沿--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.topDashboardCeilingDistance" th:field="*{infoMap.topDashboardCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">挡风玻璃斜长：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.windshieldObliquelyLong" th:field="*{infoMap.windshieldObliquelyLong}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">前挡最前沿--仪表板最深的距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.frontGearDashboardDeepestDistance" th:field="*{infoMap.frontGearDashboardDeepestDistance}" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">副驾驶空间测量（座椅H点状态）</h3>
                </div>
                <div class="panel-body">
                    <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                        <label class="col-sm-2 control-label">照片</label>
                        <div class="col-sm-10" th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile_fjskj',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType,'fjskj')})"/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">地毯--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.coPilotCarpetCeilingDistance" th:field="*{infoMap.coPilotCarpetCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中控台--门槛距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.coPilotCenterConsoleThresholdDistance" th:field="*{infoMap.coPilotCenterConsoleThresholdDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">仪表板最高沿--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.coPilotTopDashboardCeilingDistance" th:field="*{infoMap.coPilotTopDashboardCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">挡风玻璃斜长：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.coPilotWindshieldObliquelyLong" th:field="*{infoMap.coPilotWindshieldObliquelyLong}" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">中控台与驾驶舱空间测量（座椅H点状态）</h3>
                </div>
                <div class="panel-body">
                    <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                        <label class="col-sm-2 control-label">照片</label>
                        <div class="col-sm-10" th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile_zk_js',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType,'zk_js')})"/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">主副架最大间距：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.primarySecondaryMaxSpacing" th:field="*{infoMap.primarySecondaryMaxSpacing}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">主副架最小间距：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.primarySecondaryMinSpacing" th:field="*{infoMap.primarySecondaryMinSpacing}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中控扶手箱宽度：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.centralConsoleArmrestWidth" th:field="*{infoMap.centralConsoleArmrestWidth}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中控扶手箱长度：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.centralConsoleArmrestLength" th:field="*{infoMap.centralConsoleArmrestLength}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中控扶手箱--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.centralControlArmrestBoxCeilingDistance" th:field="*{infoMap.centralControlArmrestBoxCeilingDistance}" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">后排座椅空间测量（正常；前排座椅H点状态）</h3>
                </div>
                <div class="panel-body">
                    <div class="form-group" th:if="${carInfo.carInfoId!=null}">
                        <label class="col-sm-2 control-label">照片</label>
                        <div class="col-sm-10" th:include="system/common/file_upload :: multiple_img(_file_id='multipleFile_hpkj',_file_type='img',_file_list=${@file.getFiles(carInfo.carId,carInfo.configType,'hpkj')})"/>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">左侧门槛--右侧距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.leftSideSillRightDistance" th:field="*{infoMap.leftSideSillRightDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫最前沿--前排靠背距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.frontSeatCushionFrontBackrestDistance" th:field="*{infoMap.frontSeatCushionFrontBackrestDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中间座垫前沿--中控台后沿距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.frontEdgeMiddleSeatCenterConsoleRearEdgeDistance" th:field="*{infoMap.frontEdgeMiddleSeatCenterConsoleRearEdgeDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫最高沿--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.forefrontSeatCushionCeilingDistance" th:field="*{infoMap.forefrontSeatCushionCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">座垫最低--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.seatCushionMinCeilingDistance" th:field="*{infoMap.seatCushionMinCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">左（右）侧头枕最高--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.highestSideHeadrestCeilingDistance" th:field="*{infoMap.highestSideHeadrestCeilingDistance}" class="form-control" type="text"/>
                        </div>
                        <label class="col-sm-2 control-label">中间头枕最高--顶棚距离：</label>
                        <div class="col-sm-2">
                            <input name="infoMap.middleSideHeadrestCeilingDistance" th:field="*{infoMap.middleSideHeadrestCeilingDistance}" class="form-control" type="text"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-8"><button type="button" class="btn btn-success" onclick="submitHandler()">上传</button></div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/car/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                let json=$('#form-info-edit').serializeJson();
                console.log(json)
                $('#car_info').val(JSON.stringify(json.infoMap)||'{}');
                let serialize = $('#form-info-edit').serialize();
                console.log(serialize)
                // console.log(JSON.stringify($('#form-info-edit').serializeJson()))
                // return;
                $.operate.save(prefix + "/edit?_="+Math.random(), serialize);
            }
        }
        $(function (){
            //前部座椅
            multipleFile_qbzy_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img',groupType:'qbzy'});
            //驾驶空间
            multipleFile_jskj_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img',groupType:'jskj'});
            //副駕駛空間
            multipleFile_fjskj_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img',groupType:'fjskj'});
            //中控与驾驶舱
            multipleFile_zk_js_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img',groupType:'zk_js'});
            //后排空间
            multipleFile_hpkj_manager.init({busId: [[${carInfo.carId}]], busType: [[${carInfo.configType}]], fileType: 'img',groupType:'hpkj'});
        });
    </script>
</body>
</html>